package dao

import (
	"gitee.com/liu_deping/gin-vue/db"
	"gitee.com/liu_deping/gin-vue/model"
)

func AddCategory(category *model.Category) error {
	result := db.DB.Create(category)
	err := result.Error
	if err != nil {
		return err
	}
	return nil
}
